<?php
namespace APP\Controller;
use Think\Controller;
class ActivityController extends Controller {
    public function activitylist(){
        $activitymodel = M('activity');
        $activity = $activitymodel->select();      
        echo json_encode($activity);
    }
    public function activitydetail($activity_id){
     $activitymodel = M('activity');
     $activity=$activitymodel->where("activity_id=$activity_id")->find();
     echo json_encode($activity);
    }
}
?>